<%-- 
    Document   : lihatdaftar
    Created on : Dec 30, 2013, 9:26:13 AM
    Author     : Dell
--%>
<%@page import="java.sql.SQLException"%>
<%@page import="java.util.List"%>
<%@page import="database.DBClass"%>
<%@page import="model.Kipmol"%>

<%@page contentType="text/html" pageEncoding="UTF-8"%>
<!DOCTYPE html>
<html>
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
        <link rel="stylesheet" type="text/css" href="css/kipmol.css">
        <title>KIPEM ONLINE</title>
    </head>
    <body>
        <div id="main">
            <div id="header">

                <a href="#">
                    <img src="img/Logo_surabaya.gif" id="logo">
                </a>
                <img src="img/kipem.jpg" id="logoText" alt="kipmol">
            </div>

        </div>


        <div id="fullpage">
            <div id="welcomeText">
                <p>Selamat Datang di lembar daftar permintaan KIPEM baru</p>
            </div>
            <center>
            <table width="50%" border="1">
                <tr>
                    <th>No KTP</th>
                    <th>Nama</th>
                </tr>
            
                <%
                    //UserBean bean = new UserBean();
                    DBClass dbobject = new DBClass();                    
                   if (session.getAttribute("user") == null) { //memastikan bahwa user harus login terlebih dahulu
                        RequestDispatcher rd = request.getRequestDispatcher("login.jsp");
                        rd.forward(request, response);
                    } else if (session.getAttribute("status").equals("verifikasi")){
                        List list = dbobject.getAlldetails();
                        // List list2 = (List) request.getAttribute("list");
                        if (list != null) {
                            for (int i = 0; i < list.size(); i++) { //ambil perbaris dari list terus dimasukkan di ke kolom dalam tabel
                                Kipmol ubean = (Kipmol) list.get(i);%>
                                <tr>
                                    <td><%=ubean.getNIKPemohon()%></td>
                                    <td><%=ubean.getNamaPemohon()%></td>
                                </tr>
                    <%
                           }
                        }
                    }
                %>
            </table>
            </center>
                </div>
                    <div  id = "footer">
                        <p id = "footerText" > RBPL C - Kelompok 4</p> 
                    </div> 
        </body> 
        </html>
